<template>
	<view class="pf" :style="{ top: customBar }">
		<view v-if="show" @tap.stop="toDetail" class="flex flex-x-y"
			style="background-color: #BAD2FF; width: 100vw;height: 78rpx;color: #323232;">
			<view class="flex flex-y-center flex-1 ml-20">
				<view class="iconfont icon-dianhua-shi" style="font-size: 40rpx;color:#FDD92F;"></view>
				<view class="fs-28 over-line1 flex-1 ml-20">
					邀请你加入语音通话
				</view>
				<view class="mr-20 iconfont icon-jinru flex-1 flex flex-x-end" style="font-size: 40rpx;"></view>
			</view>
		</view>
	</view>


</template>

<script>
	export default {
		name: 'group-all',
		props: {
			id: {
				type: [String, Number],
				default: '',
			},
		},
		data() {
			return {
				customBar: getApp().globalData.customBar + 'px',
				show: false,
				roomId: '',
			}
		},
		methods: {
			refresh() {
				this.request({
					url: '/groupCall/callUserCount',
					voice: true,
					data: {
						groupId: this.id,
					}

				}).then(res => {
					if (res.status == 200 && res.data && res.data.roomId > -1) {
						this.show = true;
						this.roomId = res.data.roomId;
					} else {
						this.show = false;
						this.roomId = false;
					}
				});
			},
			toDetail() {
				// this.toPage(`/pages/chat/audio?roomId=${roomId}&status=1&gid=${this.gid}`, '3');
				uni.navigateTo({
					url: `/pages/chat/audio?status=2&gid=${this.id}&roomId=${this.roomId}`,
					// animationType:'slide-out-bottom',
					// animationDuration: 300,
					complete: res => {
						console.log('ssssssssssss', res);
					}
				});
				this.show = false;
				this.roomId = false;
			},
		}
	}
</script>

<style>
	.phone-logo {
		width: 52rpx;
		height: 52rpx;
		margin: 12rpx 20rpx;
	}

	.topbox {
		width: 686rpx;
		height: 78rpx;
		color: #fff;
		background-color: #214F7E;
		left: 32rpx;
		border-radius: 8rpx;

	}
</style>
